Skip to content

Fix rust / generate artifacts / python workflows [OI-3062] #1485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 17, 2025

Conversation

armallen
Copy link
Contributor

@armallen armallen commented Jul 9, 2025

Description

Rust build failed because of two things:

  • clippy reported hundreds of error: variables can be used directly in the format! string lint errors
  • Once the lint fixed, macos build failed because it reliew on brew install cmake, which installed cmake>=4.0, which is not compatible with the codebase ( CMake Error at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake.)

Then other workflows failed because deprecated ubuntu 20.04 was used in two places, but is not available anymore since 2025-04-15.

Lints are fixed, cmake version is pinned and installed with dedicated github action.
Ubuntu 20.04 runners are updated to use 24.04. If ubuntu 20.04 really needs to be used, then we'll need to use a docker image.

⚠️ WARNING
Benchmark workflow had not been running for a few month (since xlarge runner was removed). We now have an xlarge-24.04 runner that could run this workflow, but the build process is not compatible with ubuntu 24.04 I updated the runner to ubuntu-22.04 so that the benchmark step runs, but the runner itself is not "fast enough". I don't wish to spend more time fixing that right now.

API compatibility

No API change

API compatibility plan

No API change

JIRA Reference

https://swift-nav.atlassian.net/browse/OI-3062

@armallen armallen changed the title Fix rust build Fix all github workflows Jul 9, 2025
@@ -18,8 +18,8 @@ on:
jobs:
generation:
name: Generated artifacts
runs-on: ubuntu-20.04
container:
runs-on: ubuntu-24.04
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this workflow can run on anything since it's using a container below

Comment on lines +78 to +82
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.31.2"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinned to this version because why not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the minimum CMake version used anywhere right now should be 3.13. So maybe the solution is rather to update this repo's demands?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue occurs here
which is in the rust build of swiftnav-rs, which seems to be pulling/building libswiftnav using a generated cmake file

I don't have enough motivation to investigate/fix that today 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge this PR as it is, I created this ticket to fix the public libswiftnav repo and swiftnav-rs separately https://swift-nav.atlassian.net/browse/OI-3100

@@ -51,7 +51,7 @@ fn test_(((s.suite_name|snake_case)))()
match &sbp_msg {
sbp::messages::Sbp::(((t.msg.name|lower_acronyms)))(msg) => {
let msg_type = msg.message_type().unwrap();
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {}", msg_type);
assert_eq!( msg_type, (((t.msg_type))), "Incorrect message type, expected (((t.msg_type))), is {msg_type}");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg_type moved in between the curly braces to fix all lints in automatically generated tests

@@ -7,7 +7,7 @@ if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get -qq install -y pkg-config build-essential libudev-dev musl-tools
rustup target add x86_64-unknown-linux-musl
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install cmake
echo "Nothing to do for macOS"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake is installed with github action now

@armallen armallen changed the title Fix all github workflows Fix workflows [OI-3062] Jul 9, 2025
@armallen armallen changed the title Fix workflows [OI-3062] Fix rust / generate artifacts workflows [OI-3062] Jul 9, 2025
@armallen armallen marked this pull request as ready for review July 9, 2025 17:28
@armallen armallen requested review from notoriaga, pcrumley and a team as code owners July 9, 2025 17:28
@armallen
Copy link
Contributor Author

armallen commented Jul 9, 2025

Just noticed benchmarks were running on an old xlarge runner, trying it with xlarge-24.04?

Copy link
Contributor

@Madhunika-atmakuri Madhunika-atmakuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why it skipped the Rust check?

@armallen
Copy link
Contributor Author

Do we know why it skipped the Rust check?

Yes the publish step only runs for releases:

if: startsWith(github.ref, 'refs/tags/v')

Copy link

@armallen armallen changed the title Fix rust / generate artifacts workflows [OI-3062] Fix rust / generate artifacts / python workflows [OI-3062] Jul 10, 2025
@@ -18,7 +18,7 @@ on:
jobs:
coverage:
name: Test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to ubuntu-22.04 because the python dependencies build procedures are not portable and no wheels are available for newer OS versions (pip install fails on ubuntu-24.04 with default python version).

Wheels are available for ubuntu-22.04.

@armallen armallen merged commit 635fc94 into master Jul 17, 2025
14 of 15 checks passed
@armallen armallen deleted the armallen/fix-rust branch July 17, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants